﻿<Page x:Class="SubtitleEditor.View.PreferencesPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="using:SubtitleEditor.View"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d"
      xmlns:vm="using:SubtitleEditor.ViewModel"
      NavigationCacheMode="Enabled">
    <ScrollViewer>
        <StackPanel Padding="12">
            <StackPanel.ChildrenTransitions>
                <TransitionCollection>
                    <EntranceThemeTransition IsStaggeringEnabled="True" />
                </TransitionCollection>
            </StackPanel.ChildrenTransitions>
            <ComboBox Header="Theme"
                      SelectedItem="{x:Bind ViewModel.Theme, Mode=TwoWay, Converter={StaticResource EmptyConverter}}">
                <ComboBox.Resources>
                    <local:ElementThemeConverter x:Key="ElementThemeConverter" />
                </ComboBox.Resources>
                <ComboBox.ItemTemplate>
                    <DataTemplate x:DataType="ElementTheme">
                        <TextBlock Text="{Binding Converter={StaticResource ElementThemeConverter}}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
                <ElementTheme>Light</ElementTheme>
                <ElementTheme>Dark</ElementTheme>
            </ComboBox>
        </StackPanel>
    </ScrollViewer>
</Page>
